package com.bedpotato.socket;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server extends ServerSocket {
	private static final int SERVER_PORT = 10000;

	public Server() throws IOException {
		super(SERVER_PORT);
		try {
			while (true) {
				Socket socket = accept();
				new CreateServerThread(socket);
			}
		} catch (IOException e) {
		} finally {
			close();
		}
	}

	public static void main(String[] args) throws IOException {
		new Server();
	}
}
